﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Backend/AdminLayout.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Backend_Category_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminElegantFood" Runat="Server">
	<div class="panel-heading">
		<h3 class="panel-title">
			<span class="glyphicon glyphicon-folder-close"></span>គ្រប់គ្រងប្រភេទម្ហូប
		</h3>
	</div>
	<div class="panel-body">
		<efx:CreateToolBar ID="toolbar" runat="server" DestinateUrl="Backend/Category/Add.aspx" />
		<asp:Label ID="displayMessage" runat="server"></asp:Label>
		<asp:GridView ID="CategoryList" runat="server" AutoGenerateColumns="false" 
			GridLines="None" CssClass="table table-striped" 
			onrowediting="CategoryList_RowEditing" onrowdeleting="CategoryList_RowDeleting" 
			onrowupdating="CategoryList_RowUpdating" 
			onrowcancelingedit="CategoryList_RowCancelingEdit">
			<Columns>
				<asp:BoundField DataField="No" HeaderText="ល.រ" ReadOnly="true" />
				<asp:BoundField DataField="CategoryID" HeaderStyle-CssClass="sr-only" ReadOnly="true" ItemStyle-CssClass="sr-only" HeaderText="ID" />
				<asp:BoundField DataField="Name" HeaderText="ឈ្មោះ" />
				<asp:BoundField DataField="Description" HeaderText="សេចក្ដីពិពណ៌នា" />
				<asp:BoundField DataField="CreateDate" HeaderText="ថ្ងៃបង្កើត" ReadOnly="true"/>
				<asp:BoundField DataField="Status" HeaderText="Status" HtmlEncode="false" />
				<asp:TemplateField HeaderText="Action">
					<ItemTemplate>
						<asp:LinkButton ID="CategoryDelete" runat="server" CommandName="Delete" ToolTip="លុប" OnClientClick='return confirm("Are you sure you want to delete?")'><span class="glyphicon glyphicon-trash"></span></asp:LinkButton>
						<asp:LinkButton ID="CateogryEdit" runat="server" CommandName="Edit" ToolTip="កែប្រែ"><span class="glyphicon glyphicon-edit"></span></asp:LinkButton>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:LinkButton ID="CategoryUpdate" runat="server" CommandName="Update" ToolTip="រក្សាទុក"><span class="glyphicon glyphicon-floppy-disk"></span></asp:LinkButton>
						<asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel"
							ToolTip="បោះបង់"><span class="glyphicon glyphicon-remove-sign"></span></asp:LinkButton>
					</EditItemTemplate>
				</asp:TemplateField>
			</Columns>
		</asp:GridView>
	</div>
</asp:Content>